home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 June / Cd Pc Users 9.iso / prog / inst / baslibs / bassendm.bas < prev    next >
Encoding:
BASIC Source File  |  1996-12-11  |  754 b   |  27 lines

  1. Attribute VB_Name = "basSendMessage"
  2. Option Explicit
  3.  
  4. ' SendMessage API functions.
  5. Private Declare Function SendMessage Lib "user32" _
  6.    Alias "SendMessageA" (ByVal hwnd As Long, _
  7.    ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
  8.  
  9. Private Const WM_SETREDRAW = &HB
  10.  
  11. '
  12. ' Turns redraw off or on for any object with an hwnd
  13. ' Handy for the resize event.
  14. '
  15. ' Note: If .ClipControls is not False then .Refresh will
  16. ' not update things completely.
  17. '
  18. ' If someone knows how to force a form to do a complete redraw
  19. ' when .ClipControls = True please let me know.
  20. ' tarheit@alpha.wcoil.com
  21. '
  22. Public Sub SetRedraw(ob As Object, ByVal b As Boolean)
  23.    Call SendMessage(ob.hwnd, WM_SETREDRAW, IIf(b, 1, 0), 0)
  24. End Sub
  25.  
  26.  
  27.